package com.team.engine.user.action;

import javax.annotation.Resource;

import com.team.engine.common.view.BaseActionAbs;
import com.team.engine.user.service.UserServiceImpl;

public class UserAction extends BaseActionAbs {

	private static final long serialVersionUID = -1287255340348322802L;
	
	@Resource(name="userServiceImpl")
	private UserServiceImpl userService;

	public void setUserService(UserServiceImpl userService) {
		this.userService = userService;
	}
	
	public String addUser() throws RuntimeException {
		if(this.isCheckToken())
			return ERROR;
		
//		String[] nameArr = map.get("user_name");
//		if(nameArr == null || nameArr[0].trim().length()==0)
//			resultMsg = "请输入姓名";
//		
//		String name = nameArr[0];
//		if(String.valueOf(name.charAt(0)).matches("^[\\w]") || name.contains("\u0020"))
//			resultMsg = "只能以字母和数字开头，且不允许空格";
//		if(name.length()>20)
//			resultMsg = "用户名最长只能是20个字符";
//		if(false)
//			resultMsg = "用户名重复";
//		
//		Integer n = 0;
//		if (n==null)
//			resultMsg = "数据保存失败";
		
		return SUCCESS;
	}
}
